// unary operator overloading

# include <iostream>
using namespace std;

class MinusMe {
public:
  int coordX, coordY;
  MinusMe (int x, int y);
  MinusMe operator-();
  void printMe();
};

MinusMe::MinusMe(int x, int y) {
 coordX = x;
 coordY = y;
}

MinusMe MinusMe::operator-() {
  return MinusMe(-coordX, -coordY);
}

void MinusMe::printMe() {
 cout << "[" << coordX << ",  " << coordY << "]" << endl;
}

int main() {
 int x, y;
 cout << "Enter x and y co-ordinates: ";
 cin >> x >> y;
 MinusMe mm1(x,y);
 MinusMe mm2 = -mm1;
 mm1.printMe();
 mm2.printMe();
}
